package com.ruoyi.project.drugs.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.drugs.domain.Item;
import com.ruoyi.project.drugs.domain.Workload;
import com.ruoyi.project.drugs.service.WorkloadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/drugs/workload")
public class WorkloadController extends BaseController {
    @Autowired
    private WorkloadService workloadService;

    @PreAuthorize("@ss.hasPermi('drugs:workload:list')")
    @GetMapping("/list")
    public TableDataInfo selDrug(){
        startPage();
        List<Workload> workloads = workloadService.selWorkloadInfoService();
        System.out.println("---------------------------"+workloads);
        return getDataTable(workloads);
    }
}
